package za.ac.cput.peterjohn.DesignPatternPrincipals.Structural.Bridge.Model;


public abstract class Vechile
{
    public Engine engine;
    public int weightInKilos;

    public abstract void drive();

    public void setEngine(Engine engine) { this.engine = engine; }
    
    public String reportOnSpeed()
    {
        int horsepower = engine.go();
        int ratio = weightInKilos / horsepower;
        
        if( ratio < 3)
            return "The vechile is going at a fast speed";
        else if( ratio >= 3 && ratio < 8)
            return "The vechile is going an average speed";
        else
            return "The vechile is going at a slow speed";
    }  
}